package com.yy.wga.mp.module.order.controller;


import com.yy.wga.mp.module.order.response.OrderGoodsPageResponse;
import com.yy.wga.mp.module.order.service.OrderGoodsService;
import com.yy.wga.mp.module.order.request.OrderGoodsPageRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * 订单管理
 *
 * @author guochao
 * @since 2024-11-01 21:14:37
 */
@RestController
@RequestMapping("api/order/goods")
@Api(tags = "订单管理")
public class OrderGoodsController {
    /**
     * 服务对象
     */
    @Resource
    private OrderGoodsService orderGoodsService;


    @PostMapping("list")
    @ApiOperation(value = "订单列表")
    public Result<List<OrderGoodsPageResponse>> list(@Valid @RequestBody OrderGoodsPageRequest request) {
        List<OrderGoodsPageResponse> responseList = orderGoodsService.list(request);
        return Result.success(responseList);
    }
}
